package com.hu.video.mapper;

import com.hu.video.entity.SocialComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface SocialCommentMapper {
    int insertComment(SocialComment comment);
    List<SocialComment> selectCommentsByVideo(@Param("videoId") Long videoId, @Param("currentUserId") Long currentUserId);
    List<SocialComment> selectReplies(@Param("parentId") Long parentId, @Param("currentUserId") Long currentUserId);
    List<SocialComment> getFlatCommentListByVideoId(@Param("videoId") Long videoId, @Param("currentUserId") Long currentUserId);
    int updateLikeCount(@Param("commentId") Long commentId, @Param("likeCount") int likeCount);
    int updateReplyCount(@Param("commentId") Long commentId, @Param("replyCount") int replyCount);
    int deleteComment(@Param("commentId") Long commentId);
} 
 